import {get,post} from "utils/request.js"

/* 通用方法 
	@params {
		method:方法，
		url:地址，
		data:数据
	}
 */
export function custom(params){
	if(params.method === 'GET'){
		return get(params.url,params.data)
	}
	 return post(params.url,params.data)
}


// 一级分类添加
export function addFirstCategory(data){
  return post('/news/addFirstCategory/',data)
}
export function getCategoryAll(data){
  return post('/news/getCategoryAll/',data)
}
export function getCategory(data){
  return post('/news/getCategory/',data)
}
export function addChildrenCategory(data){
  return post('/news/addChildrenCategory/',data)
}

export function deleteCategory(data){
  return post('/news/deleteCategory/',data)
}
export function editCategory(data){
  return post('/news/editCategory/',data)
}
export function add(data){
  return post('/news/add/',data)
}
export function newsGetList(data){
  return post('	/news/getList/',data)
}
export function deleteInfo(data){
  return post('	/news/deleteInfo/',data)
}
export function editInfo(data){
  return post('	/news/editInfo/',data)
}
export function uploadImgToken(data){
  return post('/uploadImgToken/',data)
}


export function cityPicker(data){
  return post('/cityPicker/',data)
}

export function role(data){
  return post('/role/',data)
}

export function userRole(data){
  return post('/userRole/',data)
}


export function userAdd(data){
  return post('/user/add/',data)
}

export function deleteUser(data){
  return post('	/user/delete/',data)
}

export function editUser(data){
  return post('/user/edit/',data)
}


export function activetUser(data){
  return post('/user/actives/',data)
}

export function getSystem(data){
  return post('/system/',data)
}

export function permButton(data){
  return post('/permButton/',data)
}

